<top>
    <div class="logo"><p>Artlongs</p></div>
    <ul class="layui-nav" layui-filter="top_nav">
        <li class="layui-nav-item">
            <a href="">首页<span class="layui-badge-dot"></span></a>
        </li>
        <li class="layui-nav-item">
            <a href="">消息<span class="layui-badge">9</span></a>
        </li>
        <li class="layui-nav-item" lay-unselect="">
            <a href="javascript:;"><img src="/asset/ui/layui/images/face/1.gif" class="layui-nav-img">{userName}</a>
            <dl class="layui-nav-child">
                <dd><a href="javascript:editer('/sys/user/edit_box/{currentUserId}','编辑用户信息');">修改信息</a></dd>
                <dd><a href="/sys/login/out">退了</a></dd>
            </dl>
        </li>
    </ul>

    <style>
        .logo{display:block; with:200px;margin-left:20px;margin-top:10px;float: left}
        .layui-nav {
            background: #0B101E;
            float: right;
        }
    </style>
    <script >
        layui.use('element', function(){
            var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块

            //监听导航点击
            element.on('nav(top_nav)', function(elem){
                //console.log(elem)
                layer.msg(elem.text());
            });
        });

    </script>
</top>
